A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to xerographic reproduction by anyone of the patent document or the patent disclosure in exactly the form it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
A computer program listing appendix in a file entitled xe2x80x9cAppendixA.txtxe2x80x9d is submitted with this application on two identical compact discs, one being the primary compact disc and the other being a duplicate thereof, the entire material on which being incorporated herein by reference.
One of the many uses of computing systems is the creation and management of very large databases of various types of records. Such databases typically include a processing element coupled to a pool of storage devices (xe2x80x9cstorage volumesxe2x80x9d) in the form of disk, tape or even optical storage. And while there may be various processes (e.g., a disk process for storage volumes that are disk) to handle the actual creation of files, it typically has been the user (e.g., application program) who determines the volume on which a file should be created.
Unfortunately, for larger systems, there can often be many users creating files on the available volumes. This, in turn, can result in problems trying to determine on which storage volume the file should be created on. Often, a file will be created on a storage volume with insufficient room, and only later will this fact be discovered when the file is attempted to be written. This will produce an error that will require the user to go through the creation process once again.
Accordingly, an efficient and economical file placement method is needed.
The present invention is a file placement method that monitors the use of storage volumes (e.g. disk storage) maintained in a pool by a processing system to periodically gather from the storage volumes information concerning space availability. When a file is requested to be created by a user, the request is accompanied by certain file requirements or attributes. Those attributes include a specification of the size of the primary and secondary extents of the file and the maximum number of extents that the file will use. The volume storage information is searched to produce a list of those volumes, having characteristics matching specified file requirements of the file to be created. The storage volume most closely (if not exactly) matching those file attributes will be the one selected the least number of times before file creation. The available space for the selected storage volume is decremented by the size of the primary extent of the file to be created, and a value indicative of the least number of times the volume has been selected is incremented.
The search initially attempts to find a storage volume that can accommodate the entire file and having a fragment sufficiently large to store the larger of the primary or secondary extent of the file to be created. If that search is unsuccessful, the subset of storage volumes is then searched for storage volumes having a fragment that is sufficiently large to store the larger of the requested primary or secondary extents and a predetermined minimum number of extents. Should this search fail, additional searches are made in an effort to find a storage volume that can at least minimally accommodate the file.
In a further embodiment, each storage volume is allotted a random value between one and the number of storage volumes available as the xe2x80x9ctimes selectedxe2x80x9d value. Then, when a storage volume is selected for a file creation, the times selected value is incremented by a number equal to the number of storage volumes.
These features, as well as additional aspects and advantages of the invention, may be had from a reading of the following detailed description of the invention, which should be taken in conjunction with the accompanying drawings.